import request from "@/request/request";
import qs from "qs";

// 获取轮播图数据
export const getBannerTravel = () => request.get("/index/banners/travel");
// 游记列表
export const getTravelQuery = (orderType, currentPage) => request.get(`/travels/query?orderType=${orderType}&currentPage=${currentPage}`);
// 登录
export const LoginApi = (params) => request.post("/users/login", qs.stringify(params));
// 注册
export const RegistApi = (params) => request.post("/users/regist", qs.stringify(params));
// 验证手机号码
export const checkPhoneApi = (params) => request.get("/users/checkPhone", { params });
// 目的地数据请求
export const destinationsApi = () => request.get("/destinations/hotRegion");
// 查询地区的目的地
export const destinationsSearchApi = (params) => request.get("/destinations/search", { params });
// 查询目的地吐司层级
export const destinationsToastsApi = (params) => request.get("/destinations/toasts", { params });
